
[dbo].[OpportunityMainMember]
CREATE TABLE [dbo].[OpportunityMainMember]
(
[OpportunityKey] [uniqueidentifier] NOT NULL,
[Subscription] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DecisionDate] [datetime] NULL,
[TimingProbability] [decimal] (12, 4) NOT NULL CONSTRAINT [DF_OpportunityMainMember_TimingProbability] DEFAULT ((0)),
[Units] [int] NOT NULL,
[Potential] [decimal] (18, 4) NOT NULL,
[Actual] [decimal] (18, 4) NOT NULL,
[Quality] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ResponseMedia] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OpportunityMainMember] ADD CONSTRAINT [PK_OpportunityMainMember] PRIMARY KEY CLUSTERED ([OpportunityKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OpportunityMainMember] ON [dbo].[OpportunityMainMember] ([OpportunityKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OpportunityMainMember] ADD CONSTRAINT [FK_OpportunityMainMember_OpportunityMain] FOREIGN KEY ([OpportunityKey]) REFERENCES [dbo].[OpportunityMain] ([OpportunityKey])
GO